import request from '@/utils/request'
import config from '@/utils/config'
import routerModules from '@/router/rootRouter'
// 获取路由
export const getRouters = () => {
  if (!config.isLocal) {
    return new Promise(resolve => {
      resolve({
        "msg": "操作成功",
        "code": 200,
        "data": routerModules
      })
    })
  } else {
    return request({
      url: '/getRouters',
      method: 'get'
    })
  }

}